<script>


    function initcostsgrouplist(cmdgetcosts) {
        $.ajaxSetup({ cache: false });
        $.get(cmdgetcosts, function (data) {
            $('.NBright_CostsList').html(data);

            $('.ajaxbuttoncostdel').click(function () {
                var cmd = $(this).attr("cmd");
                $.get(cmd, function (data) {
                    document.location.reload(true);
                });
            });

        });
    };

	function isNumber(n) {
        return !isNaN(parseFloat(n)) && isFinite(n);
    }

    $(document).ready(function () {

        $('select[[id*="ddlHours"]]').val('0');
        $('select[[id*="ddlMins"]]').val('0');
        $('input[[id*="txtTimeHours"]]').val('0');

        $.datepicker.setDefaults($.datepicker.regional[['en-GB']]);
        $('input[[name$="txtTimeInpDate"]]').datepicker();

        var cmdgetcosts = '/desktopmodules/Nbright/NBrightEspace/XmlConnector.ashx?cmd=getcostrep&projectid=[<tag type="valueof" xpath="genxml/hidden/itemid" />]';
        initcostsgrouplist(cmdgetcosts);

        $('.allocatedcosts').html(' Allocated Costs: ' + '[<tag type="valueof"  xpath="genxml/hidden/hidallocatedcosts" />]');

    }); 

	
</script>
<div class="nwb-button-container">
    [<tag id="cmdCostsAddLog" type="linkbutton" resourcekey="general.add" cssclass="nwb-button primary icon add hidewhencomplete" commandname="AddLog" commandargument="ItemID"/>]
Cost : [<tag id="txtCostsAmt" datatype="double" type="textbox" width="100" />] 
Date : [<tag id="txtCostsInpDate" datatype="date" type="textbox" width="100" />]
Log : [<tag id="txtCostsLog" type="textbox" width="500" />]    
</div>
                <hr/>
			    <div class="NBright_CostsList" style="float:left;">

                </table>
			    </div>
                <div style="clear:both;"></div>